package com.supplychainapi.service;

import com.joindata.inf.common.basic.exceptions.ServiceException;
import com.supplychainapi.common.RestResponse;
import com.supplychainapi.model.ScmTbcheckexcept;
import com.supplychainapi.param.CheckExceptParam;

import java.util.List;

/**
 * Created by panic .
 * Time 2017/11/17
 * description:验收异常的crud
 */
public interface TbCheckExceptService {
    /**
     * 新增
     *
     * @param model
     * @return
     */
    RestResponse save(CheckExceptParam model) throws ServiceException;

    /**
     * 更新
     *
     * @param model
     * @return
     */
    RestResponse update(CheckExceptParam model) throws ServiceException;

    /**
     * 批量删除
     *
     * @param list
     * @param shopGuid 店铺id
     * @return
     * @throws ServiceException
     */
    RestResponse delete(List<String> list, String shopGuid) throws ServiceException;

    /**
     * 查询该店铺下所有验收异常原因
     *
     * @param shopGuid
     * @return
     * @throws ServiceException
     */
    RestResponse<List<ScmTbcheckexcept>> selectAll(String shopGuid) throws ServiceException;


    /**
     * 根据主键查询异常原因
     *
     * @param shopGuid
     * @param fsCheckExceptId
     * @return
     * @throws ServiceException
     */
    RestResponse<ScmTbcheckexcept> selectById(String shopGuid, String fsCheckExceptId) throws ServiceException;


    /**
     * 查询改店铺所有异常原因是否启用
     *
     * @param shopGuid
     * @return
     * @throws ServiceException
     */
    RestResponse<List<ScmTbcheckexcept>> selectActivateAll(String shopGuid) throws ServiceException;


    /**
     * @param shopGuid
     * @return
     */
    String getCode(String shopGuid);

}
